<?php
include('Sftp/Net/SFTP.php');
class NVL_Sftp{
    protected $server;
    protected $username;
    protected $password;
    public function __construct($_server,$_username,$_password)
    {
        $this->server = $_server;
        $this->username = $_username;
        $this->password = $_password;
    }
    public function upload(){
        $sftp = new Net_SFTP($this->server);
        if (!$sftp->login($this->username, $this->password)) {
            exit('Login Failed');
        }
        
        // puts a three-byte file named filename.remote on the SFTP server
        $sftp->put('filename.remote', 'xxx');
        // puts an x-byte file named filename.remote on the SFTP server,
        // where x is the size of filename.local
        //$sftp->put('filename.remote', 'filename.local', NET_SFTP_LOCAL_FILE);
    }
    
    
} 
?>